/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cip.esymons.eventos.be;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author oscar
 */
@Entity
@Table(name = "eca_tarifario_evento")
//@NamedQueries({@NamedQuery(name = "TarifarioEvento.findAll", query = "SELECT t FROM TarifarioEvento t"), @NamedQuery(name = "TarifarioEvento.findByTafCodigo", query = "SELECT t FROM TarifarioEvento t WHERE t.tafCodigo = :tafCodigo"), @NamedQuery(name = "TarifarioEvento.findByTafMonto", query = "SELECT t FROM TarifarioEvento t WHERE t.tafMonto = :tafMonto"), @NamedQuery(name = "TarifarioEvento.findByTaffechaInicio", query = "SELECT t FROM TarifarioEvento t WHERE t.taffechaInicio = :taffechaInicio"), @NamedQuery(name = "TarifarioEvento.findByTaffechaFin", query = "SELECT t FROM TarifarioEvento t WHERE t.taffechaFin = :taffechaFin")})
public class TarifarioEvento implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "taf_codigo")
    private Integer tafCodigo;
    @Column(name = "taf_pagaMatricula")
    private Boolean tafPagaMatricula;
    @Column(name = "taf_pagaCuota")
    private Boolean tafPagaCuota;
    @Column(name = "taf_pagaCertificado")
    private Boolean tafPagaCertificado;
    @Column(name = "taf_fechaInicioR1")
    @Temporal(TemporalType.DATE)
    private Date taffechaInicioR1;
    @Column(name = "taf_fechaFinR1")
    @Temporal(TemporalType.DATE)
    private Date taffechaFinR1;
    @Column(name = "taf_fechaInicioR2")
    @Temporal(TemporalType.DATE)
    private Date taffechaInicioR2;
    @Column(name = "taf_fechaFinR2")
    @Temporal(TemporalType.DATE)
    private Date taffechaFinR2;
    @Column(name = "taf_fechaInicioR3")
    @Temporal(TemporalType.DATE)
    private Date taffechaInicioR3;
    @Column(name = "taf_fechaFinR3")
    @Temporal(TemporalType.DATE)
    private Date taffechaFinR3;
    @Column(name = "taf_matricula_r1")
    private Double tafMatriculaR1 = 0.0;
    @Column(name = "taf_matricula_r2")
    private Double tafMatriculaR2 = 0.0;
    @Column(name = "taf_matricula_r3")
    private Double tafMatriculaR3 = 0.0;
    @Column(name = "taf_cuota_r1")
    private Double tafCuotaR1 = 0.0;
    @Column(name = "taf_cuota_r2")
    private Double tafCuotaR2 = 0.0;
    @Column(name = "taf_cuota_r3")
    private Double tafCuotaR3 = 0.0;
    @Column(name = "taf_certificado_r1")
    private Double tafCertificadoR1 = 0.0;
    @Column(name = "taf_certificado_r2")
    private Double tafCertificadoR2 = 0.0;
    @Column(name = "taf_certificado_r3")
    private Double tafCertificadoR3 = 0.0;
    @Column(name = "taf_participantesR1")
    private Integer tafParticipantesR1 = 0;
    @Column(name = "taf_participantesR2")
    private Integer tafParticipantesR2 = 0;
    @Column(name = "taf_participantesR3")
    private Integer tafParticipantesR3 = 0;
    @JoinColumn(name = "pre_codigo", referencedColumnName = "pre_codigo")
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    private Preevento preCodigo;
    @JoinColumn(name = "tpe_codigo", referencedColumnName = "tpe_codigo")
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    private TipoParticipanteEvento tpeCodigo;

    public TarifarioEvento() {
    }

    public TarifarioEvento(Integer tafCodigo) {
        this.tafCodigo = tafCodigo;
    }

    public Double getTafCuotaR2() {
        return tafCuotaR2;
    }

    public void setTafCuotaR2(Double tafCuotaR2) {
        this.tafCuotaR2 = tafCuotaR2;
    }

    public Integer getTafParticipantesR1() {
        return tafParticipantesR1;
    }

    public void setTafParticipantesR1(Integer tafParticipantesR1) {
        this.tafParticipantesR1 = tafParticipantesR1;
    }

    public Integer getTafParticipantesR2() {
        return tafParticipantesR2;
    }

    public void setTafParticipantesR2(Integer tafParticipantesR2) {
        this.tafParticipantesR2 = tafParticipantesR2;
    }

    public Integer getTafParticipantesR3() {
        return tafParticipantesR3;
    }

    public void setTafParticipantesR3(Integer tafParticipantesR3) {
        this.tafParticipantesR3 = tafParticipantesR3;
    }

    public Preevento getPreCodigo() {
        return preCodigo;
    }

    public void setPreCodigo(Preevento preCodigo) {
        this.preCodigo = preCodigo;
    }

    public Double getTafCertificadoR1() {
        return tafCertificadoR1;
    }

    public void setTafCertificadoR1(Double tafCertificadoR1) {
        this.tafCertificadoR1 = tafCertificadoR1;
    }

    public Double getTafCertificadoR2() {
        return tafCertificadoR2;
    }

    public void setTafCertificadoR2(Double tafCertificadoR2) {
        this.tafCertificadoR2 = tafCertificadoR2;
    }

    public Double getTafCertificadoR3() {
        return tafCertificadoR3;
    }

    public void setTafCertificadoR3(Double tafCertificadoR3) {
        this.tafCertificadoR3 = tafCertificadoR3;
    }

    public Double getTafCuotaR1() {
        return tafCuotaR1;
    }

    public void setTafCuotaR1(Double tafCuotaR1) {
        this.tafCuotaR1 = tafCuotaR1;
    }

    public Double getTafCuotaR3() {
        return tafCuotaR3;
    }

    public void setTafCuotaR3(Double tafCuotaR3) {
        this.tafCuotaR3 = tafCuotaR3;
    }

    public Double getTafMatriculaR1() {
        return tafMatriculaR1;
    }

    public void setTafMatriculaR1(Double tafMatriculaR1) {
        this.tafMatriculaR1 = tafMatriculaR1;
    }

    public Double getTafMatriculaR2() {
        return tafMatriculaR2;
    }

    public void setTafMatriculaR2(Double tafMatriculaR2) {
        this.tafMatriculaR2 = tafMatriculaR2;
    }

    public Double getTafMatriculaR3() {
        return tafMatriculaR3;
    }

    public void setTafMatriculaR3(Double tafMatriculaR3) {
        this.tafMatriculaR3 = tafMatriculaR3;
    }

    public Boolean getTafPagaCertificado() {
        return tafPagaCertificado;
    }

    public void setTafPagaCertificado(Boolean tafPagaCertificado) {
        this.tafPagaCertificado = tafPagaCertificado;
    }

    public Boolean getTafPagaCuota() {
        return tafPagaCuota;
    }

    public void setTafPagaCuota(Boolean tafPagaCuota) {
        this.tafPagaCuota = tafPagaCuota;
    }

    public Boolean getTafPagaMatricula() {
        return tafPagaMatricula;
    }

    public void setTafPagaMatricula(Boolean tafPagaMatricula) {
        this.tafPagaMatricula = tafPagaMatricula;
    }

    public TipoParticipanteEvento getTpeCodigo() {
        return tpeCodigo;
    }

    public void setTpeCodigo(TipoParticipanteEvento tpeCodigo) {
        this.tpeCodigo = tpeCodigo;
    }

    public Date getTaffechaFinR2() {
        return taffechaFinR2;
    }

    public void setTaffechaFinR2(Date taffechaFinR2) {
        this.taffechaFinR2 = taffechaFinR2;
    }

    public Date getTaffechaFinR3() {
        return taffechaFinR3;
    }

    public void setTaffechaFinR3(Date taffechaFinR3) {
        this.taffechaFinR3 = taffechaFinR3;
    }

    public Date getTaffechaInicioR2() {
        return taffechaInicioR2;
    }

    public void setTaffechaInicioR2(Date taffechaInicioR2) {
        this.taffechaInicioR2 = taffechaInicioR2;
    }

    public Date getTaffechaInicioR3() {
        return taffechaInicioR3;
    }

    public void setTaffechaInicioR3(Date taffechaInicioR3) {
        this.taffechaInicioR3 = taffechaInicioR3;
    }

    public Integer getTafCodigo() {
        return tafCodigo;
    }

    public void setTafCodigo(Integer tafCodigo) {
        this.tafCodigo = tafCodigo;
    }

    public Date getTaffechaInicioR1() {
        return taffechaInicioR1;
    }

    public void setTaffechaInicioR1(Date taffechaInicio) {
        this.taffechaInicioR1 = taffechaInicio;
    }

    public Date getTaffechaFinR1() {
        return taffechaFinR1;
    }

    public void setTaffechaFinR1(Date taffechaFin) {
        this.taffechaFinR1 = taffechaFin;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tafCodigo != null ? tafCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TarifarioEvento)) {
            return false;
        }
        TarifarioEvento other = (TarifarioEvento) object;
        if ((this.tafCodigo == null && other.tafCodigo != null) || (this.tafCodigo != null && !this.tafCodigo.equals(other.tafCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.cip.esymons.eventos.be.TarifarioEvento[tafCodigo=" + tafCodigo + "]";
    }
}
